# http://kiki.to/blog/2016/02/04/talk-continuous-integration-with-lua/
language: python
sudo: false

branches:
  only:
    - master
    - refactor

env:
  - LUA="lua=5.1"
  - LUA="luajit=2.0"
  - LUA="luajit=2.1"

before_install:
  - pip install hererocks
  - hererocks lua_install -r^ --$LUA
  - export PATH=$PATH:$PWD/lua_install/bin

install:
  #- luarocks install luacheck
  - luarocks install busted
  - luarocks install luacov
  - luarocks install luacov-coveralls

script:
  #- luacheck --std max+busted *.lua spec
  - busted --verbose --coverage spec

after_success:
  - luacov-coveralls -e $TRAVIS_BUILD_DIR/lua_install

notifications:
  irc: "irc.oftc.net#excessive"
  recipients:
    - shakesoda+travis@gmail.com
  email:
    on_success: change
    on_failure: always
